-- GENERATED SPELL FOR [Shattered Hand Assassin] --


function spell0_17695(pUnit, Event) --@Backstab,n/a--
pUnit:FullCastSpellOnTarget(30992,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17695', 564, 1)
end

function spell1_17695(pUnit, Event) --@Sap,n/a--
pUnit:FullCastSpellOnTarget(30980,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17695', 8258, 1)
end

function spell2_17695(pUnit, Event) --@Stealth,Self--
pUnit:FullCastSpellOnTarget(30991,pUnit)
pUnit:RegisterEvent('Sorts_17695', 0, 1)
end

function Sorts_17695(pUnit, Event)
local choix_sorts_17695 = math.random(0, 2)
if choix_sorts_17695 == 0 then
pUnit:RegisterEvent('spell0_17695', 1, 1)
end
if choix_sorts_17695 == 1 then
pUnit:RegisterEvent('spell1_17695', 1, 1)
end
if choix_sorts_17695 == 2 then
pUnit:RegisterEvent('spell2_17695', 1, 1)
end
end

function mob17695_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17695', math.random(1500, 3000), 1)
end

function mob17695_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17695_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17695_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17695, 1, 'mob17695_Action')
RegisterUnitEvent(17695, 2, 'mob17695_Leave')
RegisterUnitEvent(17695, 3, 'mob17695_Kill')
RegisterUnitEvent(17695, 4, 'mob17695_Die')
